//封装了一个 用于获取服务端中的商品数据
export const fetchProduct = () =>
  fetch("/api/data/index.json").then((body) => body.json());

//登入接口
export const loginApi = (params) =>
  fetch("/api/users/login", {
    method: "post",
    headers: { "content-type": "application/json" },
    body: JSON.stringify(params),
  }).then((body) => body.json());
